Conversation
6524dc6 to
658e370
Compare
Klakurka
left a comment
There was a problem hiding this comment.
- Can you update one of the examples in the demo page to use this? Perhaps on the XEC 'Purchase' button that already has a success-text set.
- Let's go ahead and open a PR on the server to get the button generator updated. We can update the wordpress plugin later.
| setTimeout(() => { | ||
| setNewTxText('') | ||
| }, 10000) | ||
| } |
There was a problem hiding this comment.
I wasn't really expecting this... I think it's better to stick with the standard toast and perhaps we can make a new task to better differentiate them so people don't mistakenly think they paid the full correct amount when they did not.
There was a problem hiding this comment.
On second thought - @chedieck thoughts on this? Maybe John also has some ideas how best to visually communicate the custom message while also making it clear that less than the full amount was paid.
There was a problem hiding this comment.
Maybe call it "Unexpected payment" or something like that by default? Probably some other more precise adjective would be better.
As for the PR, this 10000 should be a constant instead of a hardcoded number.
| setTimeout(() => { | ||
| setNewTxText('') | ||
| }, 10000) | ||
| } |
There was a problem hiding this comment.
Maybe call it "Unexpected payment" or something like that by default? Probably some other more precise adjective would be better.
As for the PR, this 10000 should be a constant instead of a hardcoded number.
Klakurka
left a comment
There was a problem hiding this comment.
I tried to send the wrong amount to a widget and wasn't able to get the tx to appear. I even entered the op_return_raw for it but still nothing.
| if (transactionText){ | ||
| enqueueSnackbar( | ||
| `${ | ||
| transactionText ? transactionText : 'New transaction' |
There was a problem hiding this comment.
I don't think this should be set by default.
Let's keep the old behaviour (of no toast) if it's not set.
There was a problem hiding this comment.
it is already set to only trigger the toast if there is a transaction text set
docs/README.md
Outdated
|
|
||
| ## transaction-text | ||
|
|
||
| > **The ‘transaction-text’ parameter specifies the text displayed when a new transaction occurs.** |
There was a problem hiding this comment.
Let's clarify that it's displayed when a new transaction is received that doesn't have the correct amount & OP_RETURN code.
On BCH we just check that it's the correct amount as OP_RETURN is not really supported well on the wallet side.
docs/zh-cn/README.md
Outdated
|
|
||
| ## transaction-text | ||
|
|
||
| > **“transaction-text” 参数指定在新交易发生时显示的文本。** |
docs/zh-tw/README.md
Outdated
|
|
||
| ## transaction-text | ||
|
|
||
| > **"transaction-text" 參數指定在新交易發生時顯示的文字。** |
|
We'll be adding support for BIP 70 in the near future so this feature may end up being obsolete in most cases. |
8492963 to
8a67599
Compare
|
Conflicts. |
8a67599 to
fa9f2d1
Compare
resolved |
chedieck
left a comment
There was a problem hiding this comment.
Nothing is appearing to me now.
Tried with
<div class="paybutton" to="ecash:qq3zv9s3jna6x5t0fxzfgd2zwteqyyjrscf9zmthz7" text="Mine" amount="21"
currency="XEC" goal-amount="1000" success-text="WOW!" on-close="myClose" on-open="myOpen"
on-success="mySuccessFunction" on-transaction="myTransactionFunction"
transaction-text="fooo"></div>
fa9f2d1 to
3dba7d9
Compare
Klakurka
left a comment
There was a problem hiding this comment.
I actually couldn't get this to work.
My steps:
- Update
dev/demo/index.html, addingtransaction-text="partial payment"to theBasicbutton. - Open http://localhost:10001/
- Click the
Basicbutton to open the QR code. - Click the QR code to copy the BIP21 URI. Paste the URI somewhere and edit out the amount. Copy the URI without the amount.
- Open https://cashtab.com/ and paste the URI into the address field.
- Enter an amount of 8 (or something that isn't 10).
- Click
Send.
When I follow these steps, nothing happens.
Related to #270
Description
Added the
transaction-textprop. Thetransaction-textwill be displayed in the widget when a transaction occurs, but the amount does not match the required amount, preventing a success message.Test plan